export default{
  data() {
    return {
      searchObject: {
        _page: 1,
        _limit: 10
      },
      rowDetail: {},
      selectRows: []
    };
  },
  mounted () {
    window.show = this.showDetail; // 方法赋值给window
    window.remove = this.removeOneRow;
  },
  methods: {
    handlePageChange(val) {
      this.searchObject._page = val;
      this.getList();
      console.log('切换页数', val);
    },
    handlePageSizeChange(val) {
      this.searchObject._limit = val;
      this.getList();
      console.log('切换显示条目数', val);
    },
    handleSelectRow(row) {
      console.log('列表多选返回打印', row);
      this.selectRows = row;
    },
    showDetail(params) {
      console.log('打印详情信息', params.row);
      if (this.$data.hasOwnProperty('activeType')){
        params.row.activeType = this.activeType;
      }
      this.modalShow = true;
      this.modelObiect.title = this.updateTitle;
      this.rowDetail = params.row;
    },
    removeOneRow(params) {
      console.log('打印删除的数据信息', params.row);
      this.strikeOut(params.row.id);
    }
  }
};
